package my.diplom.dao.service;

import my.diplom.dao.IOrderDAO;
import my.diplom.entity.Order;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: gb
 * Date: 14.07.2009
 * Time: 17:25:28
 * To change this template use File | Settings | File Templates.
 */
public class OrderService {

    private IOrderDAO orderDAO;

    public IOrderDAO getOrderDAO() {
        return orderDAO;
    }

    public void setOrderDAO(IOrderDAO orderDAO) {
        this.orderDAO = orderDAO;
    }

    public void create(Order order) {
        orderDAO.create(order);
    }

    public void update(Order order) {
        orderDAO.update(order);
    }

    public Order getById(Long orderId) {
        return orderDAO.getById(orderId);
    }

    public List<Order> getAll() {
        return orderDAO.getAll();
    }

    public void delete(Order order) {
        orderDAO.delete(order);
    }

    public List<Order> getByLogin(String login) {
        return orderDAO.getByLogin(login);
    }
}
